package horncomb.bpm.hrsm.interact;

import horncomb.bpm.BpmContextHolder;
import horncomb.bpm.task.core.TaskInstance;
import horncomb.bpm.task.support.TaskForm;

/**
 * @author Daniel
 */
public class MockTaskForm implements TaskForm {
	private String taskInstanceId;

	/**
	 * @return the id
	 */
	public String getTaskInstanceId() {
		return taskInstanceId;
	}

	/**
	 * @param id
	 *            the id to set
	 */
	public void setTaskInstanceId(String taskInstanceId) {
		this.taskInstanceId = taskInstanceId;
	}

	/**
	 * {@inheritDoc}
	 */
	public TaskInstance getTaskInstance() {
		return BpmContextHolder.getContext().getTaskManagementServcie()
				.findTaskInstance(this.taskInstanceId);
	}
}
